// vite.config.ts
import { defineConfig } from 'vite'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import path from 'path'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
  // ...
  plugins: [
    vue(),
    // ...
    AutoImport({
      imports: ['vue', '@vueuse/core'],
      dts: true,
    }),
    Components({
      resolvers: [
        ElementPlusResolver(),
        ],
        dts: true,
    }),
   
  ],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
      '@components': path.resolve(__dirname, './src/components'),
      // 定义其他的别名...
    },
  }
})